{% include 'layout.html' %}

<div class="container">
    <div class="card">
        <div class="card-header">
            Login
        </div>
        <div class="card-body">

            {% if msg %}
            {% if msg == 'Logout Successful' or msg == 'User successfully created' %}
            <div class="alert alert-success" role="alert">
                {{msg}}
            </div>
            {% else %}
            <div class="alert alert-danger" role="alert">
                {{msg}}
            </div>
            {% endif %}
            {% endif %}

            <form method="POST" action="/auth">
                <div class="form-group">
                    <label>Username</label>
                    <input type="text" class="form-control"
                           name="email" required>
                </div>
                <div class="form-group">
                    <label>Password</label>
                    <input type="password" class="form-control" name="password" required>
                </div>
                <button type="submit" class="btn btn-primary">Login</button>
            </form>
        </div>
        <div class="card-footer text-muted">
            <a href="register"> Register? </a>
        </div>
    </div>
</div>

